<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>平面转换-旋转</title>
  <style>
    img {
      width: 200px;
      transition: all 2s;
    }

    /* 鼠标悬停到图片上面,添加旋转效果 */
    img:hover {
      /* 正数: 顺时针旋转 */
      transform: rotate(360deg);

      /* 负数: 逆时针旋转 */
      transform: rotate(-360deg);
    }
  </style>
</head>
<body>
  <img src="./images/rotate.png" alt="">
</body>
</html>